package me.ereach.internalback.controller;

import me.ereach.internalback.mapper.VXHClassMapper;
import me.ereach.internalback.viewmodel.VXHClass;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@CrossOrigin
@RequestMapping("/sys")
public class CtrlVXHClasses {
    @Autowired
    private VXHClassMapper vxhClassMapper;

    @GetMapping("/class")
    public List<VXHClass> getVXHClass() {
        List<VXHClass> vxhClasses = vxhClassMapper.selectList(null);
        return vxhClasses;
    }
}
